package edu.bbu.commonproject.desktop.gui.view.swing.login;

import java.awt.BorderLayout;

import javax.swing.JPanel;

import edu.bbu.commonproject.desktop.gui.view.LoginInterface;

/**
 * The start view class.
 */
public class StartViewPanel extends JPanel implements LoginInterface
{
	/** The start header panel. */
	private HeaderPanel startHeaderPanel;
	
	/** The start center panel. */
	private CenterPanel startCenterPanel;
	
	/**
	 * The constructor.
	 */
	public StartViewPanel()
	{
		this.setLayout(new BorderLayout());
		
		setComponents();
	}
	
	/**
	 * Sets the components.
	 */
	private void setComponents()
	{
		startHeaderPanel = new HeaderPanel();
		startCenterPanel = new CenterPanel();

		this.add(startHeaderPanel, BorderLayout.NORTH);
		this.add(startCenterPanel, BorderLayout.CENTER);
	}
	
	/**
	 * Gets the login view change button.
	 */
	public Object getLoginViewChangeButton()
	{
		return startHeaderPanel.getStartLogoPanel().getLoginButton();
	}

	/**
	 * Gets the register view change button.
	 */
	public Object getRegisterViewChangeButton()
	{
		return startHeaderPanel.getStartLogoPanel().getRegisterButton();
	}

	/**
	 * Gets the forgoton password view change button.
	 */
	public Object getForgotPasswordViewChangeButton()
	{
		return startHeaderPanel.getStartLogoPanel().getForgetButton();
	}
	
	/**
	 * Gets the login panel.
	 */
	public Object getLoginPanel()
	{
		return startCenterPanel.getCenterCollectionPanel().getLoginPanel();
	}

	/**
	 * Gets the register panel.
	 */
	public Object getRegisterPanel()
	{
		return startCenterPanel.getCenterCollectionPanel().getRegisterPanel();
	}

	/**
	 * Gets the forgoton password panel.
	 */
	public Object getForgotPasswordPanel()
	{
		return startCenterPanel.getCenterCollectionPanel().getForgotPasswordPanel();
	}
	
	/**
	 * Gets the collection panel. 
	 */
	public Object getCollectionPanel()
	{
		return startCenterPanel.getCenterCollectionPanel();
	}
	
	/**
	 * Gets the login username texfield.
	 */
	public Object getLoginUserNameTextField()
	{
		return startCenterPanel.getCenterCollectionPanel().getLoginPanel().getUserNameTextField();
	}

	/**
	 * Gets the login password texfield.
	 */
	public Object getLoginPasswordTextField()
	{
		return startCenterPanel.getCenterCollectionPanel().getLoginPanel().getPasswordTextField();
	}

	/**
	 * Gets the login user button.
	 */
	public Object getLoginUserButton()
	{
		return startCenterPanel.getCenterCollectionPanel().getLoginPanel().getLoginButton();
	}
	
	/**
	 * Gets the login error label.
	 */
	public  Object getLoginErrorLabel()
	{
		return startCenterPanel.getCenterCollectionPanel().getLoginPanel().getErrorLabel();
	}

	/**
	 * Gets the registered email texfield.
	 */
	public Object getRegisterEmailTextField()
	{
		return startCenterPanel.getCenterCollectionPanel().getRegisterPanel().getUserNameTextField();
	}
	
	/**
	 * Gets the register confirmation texfield.
	 */
	public Object getRegisterConfirmEmailTextField()
	{
		return startCenterPanel.getCenterCollectionPanel().getRegisterPanel().getConfirmUsernameTextField();
	}
	
	/**
	 * Gets the register button.
	 */
	public Object getRegisterButton()
	{
		return startCenterPanel.getCenterCollectionPanel().getRegisterPanel().getRegisterButton();
	}
	
	/**
	 * Gets the register error label.
	 */
	public Object getRegisterErrorLabel()
	{
		return startCenterPanel.getCenterCollectionPanel().getRegisterPanel().getErrorLabel();
	}

	/**
	 * Gets the forgot password texfield.
	 */
	public Object getForgotPasswordTextField()
	{
		return startCenterPanel.getCenterCollectionPanel().getForgotPasswordPanel().getUserNameTextField();
	}
	
	/**
	 * Gets the forgoton password button.
	 */
	public Object getForgotPasswordButton()
	{
		return startCenterPanel.getCenterCollectionPanel().getForgotPasswordPanel().getForgotPasswordButton();
	}
	
	/**
	 * Gets the forgot password error label.
	 */
	public Object getForgotPasswordErrorLabel()
	{
		return startCenterPanel.getCenterCollectionPanel().getForgotPasswordPanel().getErrorLabel();
	}

	/**
	 * Gets the logon menu item.
	 */
	public Object getLogonMenuItem()
	{
		return startHeaderPanel.getLoginMenuItem();
	}

	/**
	 * Gets the registered menu item.
	 */
	public Object getRegisterMenuItem()
	{
		return startHeaderPanel.getRegisterMenuItem();
	}

	/**
	 * Gets the forogton menu item.
	 */
	public Object getFrogotMenuItem()
	{
		return startHeaderPanel.getForgotPasswordMenuItem();
	}

	/**
	 * Gets the exit menu item.
	 */
	public Object getExitMenuItem()
	{
		return startHeaderPanel.getExitMenuItem();
	}

	/**
	 * Gets the help menu item.
	 */
	public Object getHelpMenuItem()
	{
		return startHeaderPanel.getHelpMenu();
	}

	/**
	 * Gets the about menu item.
	 */
	public Object getAboutMenuItem()
	{
		return startHeaderPanel.getAboutMenuItem();
	}
}
